<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>在线问诊</title>
    <link rel="stylesheet" type="text/css" href="../../css/chat.css" />
    <link rel="stylesheet" type="text/css" href="../../css/public.css" />
    <script type="text/javascript" src="../../script/chat/lib-flexible.js"></script>
    <style>
        html,
        body {
            margin: 0;
            padding: 0;
            background-color: #fff;
            margin: 0;
            padding: 0;
            width: 100%;
        }

        header {
            width: 100%;
            background-color: #F4F4F4;
        }
    </style>
</head>

<body>
    <header id="header">
        <div class="header"></div>
    </header>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/zepto.min.js"></script>
<script type="text/javascript" src="../../script/hb.js"></script>
<script type="text/javascript" src="../../script/vue.js"></script>
<script type="text/javascript" src="../../script/chat/common.js"></script>
<script type="text/javascript">
    apiready = function () {
        fnInit()
        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            if (api.pageParam.index == 1) {
                api.closeToWin({
                    name: './html/main'
                });
                api.closeToWin({
                    name: 'main'
                });
                sendting("closeChat")
            } else {
                api.closeWin()
            }
        });
    };

    var eHeader, headerH;

    function fnInit() {
        api.setStatusBarStyle({
            style: 'dark',
            color: "transparent"
        });
        eHeader = $api.dom('header');
        $api.fixStatusBar(eHeader);
        headerH = $api.offset(eHeader).h;
        // // 设置头部底部fixStatusBar fixTabBar 状态栏跟ios底部栏的自适应高度
        //  $api.text($api.byId('nickname'), api.pageParam.name)
        api.openFrame({
            name: 'chat_list_frm',
            url: './chat_list_frm.html',
            rect: {
                x: 0,
                y: headerH,
                w: api.winWidth,
                h: api.winHeight - headerH
            },
            pageParam: api.pageParam,
            reload: true,
            bounces: false,
            bgColor: '#fff',
            vScrollBarEnabled: false,
            hScrollBarEnabled: false
        })
    }
</script>

</html>
